1. Field of the Invention
The present invention relates to an image generating apparatus that generates an image of a plurality of objects existing in a virtual three-dimensional space and the like, and more particularly, to drawing a contour line in a case where a target object in which a contour line is to be drawn and a non-target object in which a contour line is not to be drawn among the plurality of objects are overlapped with each other.
2. Description of the Related Art
In video games, owing to recent improvement of process capabilities of game devices, very realistic images can be drawn in three-dimensional computer graphics. However, in a game having a specific content, when the image is too realistic, the fun of the game decreases. Accordingly, in such a case, images of a cartoon style or an animation style are drawn in the three-dimensional computer graphics by using a technique called tuned rendering. A contour line is drawn in the contour of an object (hereinafter, referred to as a tuned object) for which a tuned rendering process is performed.
However, for example, in order to represent a case where an animation image and a photographed image are composed together, it is preferable that the game world is represented not by using only tuned objects and an object of terrain and the like are configured as objects (hereinafter, referred to as non-tuned objects) for which a tuned rendering process is not performed and a contour line is not drawn. As described above, when tuned objects and non-tuned objects are mixed together in a virtual three-dimensional space, it is natural that a case where a tuned object and a non-tuned object are overlapped with each other occurs.
However, in order to draw a contour line in the tuned object, first, the contour of the tuned object in an image projected on a virtual screen by a perspective transformation process needs to be detected. An operation for detecting the contour, for example, can be performed based on a contour detection image drawn in accordance with luminance depending on a distance from a viewing point of a virtual camera (for example, see JP-A-2007-26111 (paragraphs 0051 to 0093)). When the tuned objects and the non-tuned objects are mixed together, both of them are perspective transformed on the virtual screen. Accordingly, the tuned objects and the non-tuned objects are not differentiated for detection of the contours.
As described above, when the contours of objects are to be detected, in a part in which a plurality of objects are overlapped with one another, the boundary of the overlapped part is detected as the contours of the objects. The boundary of the part in which the tuned object and the non-tuned object are overlapped with each other is also the contour of the tuned object, and when a contour line is drawn along the contour of the tuned object, an image in which a contour line is drawn on the non-tuned object side on which the contour line is not supposed to be drawn is generated.
In such a case, when the tuned object is located on the front side (a side close to the viewing point), a contour line is drawn in the original shape of the tuned object, and a strong feeling of strangeness is caused. On the other hand, when the non-tuned object is located on the front side, there is a case where an unnatural image from which the tuned object is felt to be lifted up in a shape different from its original shape is generated. In addition, when the non-tuned object is located on the front side in a place in which tuned objects and non-tuned objects are complicatedly entangled, there is also a case where the contour lines are felt to be very disordered.